This disclosure relates generally to database management systems, and more specifically, to adjusting the time that a statistics collection component of a database management system updates database statistics.
A relational database organizes data in two dimensions, i.e., as tables having rows and columns. A relational database is typically used in an enterprise to store large quantities of transactional data. User programs can be used to access a database. An access may read or write data to the database. In addition, an access may include searching for particular data. Structured Query Language (SQL) is a language that may be used to access data stored in a relational database.
Many database management systems (DBMS) include a query optimizer and a statistics collection component to collect various statistics for data tables. Some example statistics include the number of rows in a table, the number of distinct values in a column (cardinality), the most frequent values in a column, and the distribution of data values. The query optimizer uses table statistics to generate and select an access plan for executing a particular query. The query optimizer may select a “best” plan from several alternative plans, e.g., a plan that is fastest, uses fewest resources, and the like.